<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="vi" lang="vi">
<head>
<title><?php echo $title; ?></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="author" content="honestphan, SVTB JSC, WEB KID" />
<link href="./view/image/icon.ico" rel="icon" />
<link rel="stylesheet" type="text/css" href="./view/shadowbox/shadowbox.css">
<link rel="stylesheet" type="text/css" href="./view/stylesheet/stylesheet.css" />

<link rel="stylesheet" type="text/css" href="./view/javascript/jquery/ui/themes/ui-lightness/ui.all.css" />
<link rel="stylesheet" href="./view/javascript/jquery/validform/validationEngine.jquery.css" type="text/css"/>
<script type="text/javascript" src="./view/javascript/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="./view/javascript/jquery/ui/ui.core.js"></script>
<script type="text/javascript" src="./view/javascript/jquery/superfish/js/superfish.js"></script>
<script type="text/javascript" src="./view/shadowbox/shadowbox.js"></script>
<script src="./view/javascript/jquery/validform/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8"></script>
<script src="./view/javascript/jquery/validform/jquery.validationEngine.js" type="text/javascript" charset="utf-8"> </script>
<script type="text/javascript" src="./view/javascript/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="./view/javascript/ckfinder/ckfinder.js"></script>

<?php if($setting['mudim']=='1') {?>
<script type="text/javascript" src="./view/javascript/mudim-0.8-r153.js"></script>
<?php }?>
<script type="text/javascript"><!--
$('.switcher').bind('click', function() {
	$(this).find('.option').slideToggle('fast');
});
$('.switcher').bind('mouseleave', function() {
	$(this).find('.option').slideUp('fast');
}); 
//--></script> 
 <script type="text/javascript">
Shadowbox.init({
    handleOversize: "drag",
    modal: true
});
</script>

<script type="text/javascript">
//-----------------------------------------
// Confirm Actions (delete, uninstall)
//-----------------------------------------
$(document).ready(function(){
	
    // Confirm Delete
    $('#form').submit(function(){
        if ($(this).attr('action').indexOf('delete',1) != -1) {
            if (!confirm ('<?php echo $text_confirm; ?>')) {
                return false;
            }
        }
    });
    	
    // Confirm Uninstall
    $('a').click(function(){
        if ($(this).attr('href') != null && $(this).attr('href').indexOf('uninstall',1) != -1) {
            if (!confirm ('<?php echo "ban co muon xoa ko"; ?>')) {
                return false;
            }
        }
    });
});
</script>

<script type="text/javascript">
$(document).ready(function(){
    $(".scrollbox").each(function(i) {
    	$(this).attr('id', 'scrollbox_' + i);
		sbox = '#' + $(this).attr('id');
    	$(this).after('<span><a onclick="$(\'' + sbox + ' :checkbox\').attr(\'checked\', \'checked\');"><u><?php echo $text_select_all; ?></u></a> / <a onclick="$(\'' + sbox + ' :checkbox\').attr(\'checked\', \'\');"><u><?php echo $text_unselect_all; ?></u></a></span>');
	});
});
</script>

<script type="text/javascript">
$(document).ready(function() {
  $(".list tr:even").css("background-color", "#F4F4F8");
});
</script>
<script type="text/javascript">
function confirmDelete(delUrl) {
   if (confirm("Bạn chắc chắn muốn xóa?")) {
     document.location = delUrl;
}
}
</script>

<script type="text/javascript">
    $(document).ready(function(){
    $("#test_button").click(function(){
    var test_value = $("#test_input").val();
    var extension = test_value.split('.').pop().toLowerCase();
    if( $.inArray(extension, ['doc', 'xls', 'zip', 'ppt', 'pdf']) == -1 ){
    alert("File ảnh không hợp lệ!"); return false; }
    else{ alert("File ảnh hợp lệ!"); return false; } });
    });
</script>

<script type="text/javascript">
function confirmDacSac(delUrl) {
   if (confirm("Bạn muốn chọn di sản này làm di sản đặc sắc?")) {
     document.location = delUrl;
}
}
</script>

</head>
<body>
<div id="container">
<div id="header">
  <div class="div1"><img src="./view/image/logo.png" title="<?php echo "Nhà nghỉ Tân Thanh"; ?>" onclick="location = '<?php echo $home; ?>'" /></div>
  <?php if ($_SESSION['loged']) { ?>
  <div class="div2"><img src="./view/image/lock.png" alt="" style="position: relative; top: 3px;" />&nbsp;<?php echo $_SESSION['ten_can_bo']; ?></div>
  <?php } ?>
  </div>
  
<?php if ($_SESSION['loged']) { ?>
<div id="menu">
  <ul class="nav left" style="display: none;">
    <li id="dashboard"><a href="index.php?module=home" class="top"><?php echo"Trang chủ"; ?></a></li>
  
   <?php if ($_SESSION['loged']) { ?>
    <li id="catalog"><a class="top"><?php echo "Quản lí người dùng" ?></a>
      <ul>
        <?php if(( $_SESSION['type']=='quantri')||( $_SESSION['type']=='develop')){?>
       
        <?php } ?>
        <li><a href="index.php?module=canbo&act=list"><?php echo "Danh sách người dùng"; ?></a></li>
        <li><a href="index.php?module=phongban&act=list"><?php echo "Phòng ban"; ?></a></li>
        <li><a href="index.php?module=chucdanh&act=list"><?php echo "Chức danh"; ?></a></li>
        <li><a href="index.php?module=dantoc&act=list"><?php echo "Dân tộc"; ?></a></li>
       
        
      </ul>
    </li>
   
     <li id="catalog"> <a class="top" href="#">Quản lý website</a>
     <ul>
          
           <li><a href="index.php?module=gioithieu&act=list"><?php echo "Giới thiệu về công ty"; ?></a></li>
           <li><a href="index.php?module=tuyendung&act=list"><?php echo "Tuyển dụng"; ?></a></li>
           <li><a href="index.php?module=bangtin&act=list"><?php echo "Thông báo chung"; ?></a></li> 
           
           <li><a href="#" class="parent"><?php echo "Tin tức"; ?></a>
                <ul>
                  
                   <li><a href="index.php?module=tinhoatdong&act=list"><?php echo "Danh sách tin tức"; ?></a></li> 
                   <li><a href="index.php?module=tinhoatdong&act=cat"><?php echo "Danh mục tin"; ?></a></li> 
             
                </ul>
           </li>
      
          
        <li><a href="index.php?module=lienketweb&act=list"><?php echo "Liên kết website"; ?></a></li>
        <li><a href="index.php?module=quangcao&act=list"><?php echo "Quảng cáo"; ?></a></li>
        <li><a href="index.php?module=webinfo&act=list"><?php echo "Thông tin trang web"; ?></a></li>
      </ul>
    </li>
    </li>
    
     <?php } ?>
     
    <li id="dichvu"><a class="top"><?php echo "Dịch vụ" ?></a>
      <ul>
	        <?php if(( $_SESSION['type']=='quantri')||( $_SESSION['type']=='develop')){?>
	       
	        <?php } ?>
	       <li><a href="#" class="parent"><?php echo "Thiết kế web"; ?></a>
			<ul>
	                  
	                   <li><a href="index.php?module=thietkeweb&act=list"><?php echo "Nội dung"; ?></a></li> 
	                   <li><a href="index.php?module=thietkeweb&act=cat"><?php echo "Chuyên mục"; ?></a></li> 
	             
	                </ul>
	       </li> 
               <li><a href="#" class="parent"><?php echo "Tên miền"; ?></a>       
                         <ul>
	                  <li><a href="index.php?module=domain&act=list"><?php echo "Nội dung"; ?></a></li> 
	                   <li><a href="index.php?module=domain&act=cat"><?php echo "Chuyên mục"; ?></a></li> 
                         </ul>
	       </li> 
	       <li><a href="#" class="parent"><?php echo "Hosting"; ?></a>
	                  <ul>
                           <li><a href="index.php?module=hosting&act=list"><?php echo "Nội dung"; ?></a></li> 
	                   <li><a href="index.php?module=hosting&act=cat"><?php echo "Chuyên mục"; ?></a></li> 
                          </ul>

	       </li> 
	       <li><a href="#" class="parent"><?php echo "Thiết kế đồ họa"; ?></a>
	                   <ul>
			   <li><a href="index.php?module=graphic&act=list"><?php echo "Nội dung"; ?></a></li> 
	                   <li><a href="index.php?module=graphic&act=cat"><?php echo "Chuyên mục"; ?></a></li> 
                           </ul>
	       </li> 
      </ul>
    </li>

     <li id="sanpham"><a class="top"><?php echo "Sản phẩm" ?></a>
      <ul>
        <?php if(( $_SESSION['type']=='quantri')||( $_SESSION['type']=='develop')){?>
       
        <?php } ?>
    
                   <li><a href="#"  class="parent"><?php echo "Phần mềm"; ?></a>
  			<ul>
			   <li><a href="index.php?module=phanmem&act=list"><?php echo "Danh sách phần mềm"; ?></a></li>
	                   <li><a href="index.php?module=phanmem&act=cat"><?php echo "Loại phần mềm"; ?></a></li> 
	                </ul>
                   </li> 
                  <li><a href="index.php?module=website&act=list"  class="parent"><?php echo "Website"; ?></a>
                        <ul>
			   <li><a href="index.php?module=website&act=list"><?php echo "Danh sách website"; ?></a></li>
	                   <li><a href="index.php?module=website&act=cat"><?php echo "Loại website"; ?></a></li> 
	                </ul>
                  </li> 
             
                </ul> 
      
    </li>
     
    <?php if ($_SESSION['type']=='develop') { ?>
    <li id="system"><a class="top"><?php echo "Hệ thống"; ?></a>
      <ul>
       <li><a href="index.php?module=cauhinh&act=chung"><?php echo "Cấu hình chung"; ?></a></li>
       <li><a href="index.php?module=setting&act=mailcf"><?php echo "Cấu hình mail"; ?></a></li>
       <li><a href="index.php?module=setting&act=template"><?php echo "Giao diện"; ?></a></li>
       <li><a href="index.php?module=setting&act=security"><?php echo "Bảo mật"; ?></a></li>
       <li><a href="index.php?module=setting&act=info"><?php echo "Thông tin"; ?></a></li>
      </ul>
    </li>
    <?php } ?>

     <li id="system"><a class="top" href="https://cp187005.bkns.com.vn:2096/" target="_blank"><?php echo "E Mail"; ?></a></li>
     


    <li id="help"><a class="top"><?php echo "Hướng dẫn sử dụng"; ?></a>
    <ul>
    <?php if ($_SESSION['type']=='develop') { ?>
    <li><a href="index.php?module=huongdan&act=list"><?php echo "Soạn hướng dẫn"; ?></a></li>
    <?php } ?>
    <li><a href="index.php?module=huongdan&act=view_hv"><?php echo "Tài liệu hướng dẫn"; ?></a></li>
    </ul>
    </li>
  </ul>
  
  <ul class="nav right">
    <?php if ($_SESSION['loged']) { ?>
    <li id="store"><a onclick="window.open('index.php?module=canbo&act=my_prolife');" class="top"><?php echo  $_SESSION['user']; ?></a> </li>
    <li id="store"><a class="top" href="index.php?module=canbo&act=logout"><?php echo "Thoát"; ?></a></li>
    <?php } else {?>
    <li id="store"><a class="top" href="index.php?module=canbo&act=login"><?php echo "Đăng nhập"; ?></a></li>
    <?php } ?>
    
  </ul>
  
  <script type="text/javascript"><!--
$(document).ready(function() {
	$('.nav').superfish({
		hoverClass	 : 'sfHover',
		pathClass	 : 'overideThisToUse',
		delay		 : 0,
		animation	 : {height: 'show'},
		speed		 : 'quick',
		autoArrows   : false,
		dropShadows  : false, 
		disableHI	 : false, /* set to true to disable hoverIntent detection */
		onInit		 : function(){},
		onBeforeShow : function(){},
		onShow		 : function(){},
		onHide		 : function(){}
	});
	
	$('.nav').css('display', 'block');
});
//--></script>
  <script type="text/javascript"><!-- 
function getURLVar(urlVarName) {
	var urlHalves = String(document.location).toLowerCase().split('?');
	var urlVarValue = '';
	
	if (urlHalves[1]) {
		var urlVars = urlHalves[1].split('&');

		for (var i = 0; i <= (urlVars.length); i++) {
			if (urlVars[i]) {
				var urlVarPair = urlVars[i].split('=');
				
				if (urlVarPair[0] && urlVarPair[0] == urlVarName.toLowerCase()) {
					urlVarValue = urlVarPair[1];
				}
			}
		}
	}
	
	return urlVarValue;
} 

$(document).ready(function() {
	route = getURLVar('module');
	
	if (!route) {
		$('#dashboard').addClass('selected');
	} else {
		part = route.split('/');
		
		url = part[0];
		
		if (part[1]) {
			url += '/' + part[1];
		}
		
		$('a[href*=\'' + url + '\']').parents('li[id]').addClass('selected');
	}
});
//--></script>
</div>
<?php } ?>

<div id="content">

